import React,{useEffect} from 'react';
import { useParams ,useNavigate} from 'react-router-dom'
const Index = () => {
    const navigator = useNavigate()
    let params = useParams();;
    useEffect(() => {
        console.log(params);
    });
    return (
        <div>
            detail
            <p><button onClick={()=>{
                navigator(-1)
            }}>跳转回首页</button></p>
        </div>
    );
}

export default Index;
